﻿using System;

namespace Caramel.Cqrs
{
	public abstract class EventHandler<TEvent> : IEventHandler<TEvent>
		where TEvent : class, IEvent
	{
		public abstract void Handle(TEvent @event);

		void IEventHandler.Handle(IEvent @event)
		{
			this.Handle(@event as TEvent);
		}
	}
}
